package sugarbind_input

class SourceController {

    def scaffold = true
	
	def findSources = {
		println("findSources params : " +params)
			
		def sources = Source.listSources()
		def selected


		try
		{
			selected = Source.get(params.source)
		}
		catch(Exception ex)
		{
			println(ex.getMessage())
		}
		println(sources)
		println(selected)
		
		render(template: 'ddlSources', model:  [sources : sources, selected:selected])
	  }
}
